use libc;

pub type __kernel_rwf_t = libc::c_int;


#[repr(C)]
#[derive(Copy, Clone)]
pub union sqe_flags {
    pub rw_flags: __kernel_rwf_t,
    pub fsync_flags: u32,
    pub poll_events: u16,
    pub sync_range_flags: u32,
    pub msg_flags: u32,
    pub timeout_flags: u32,
}

#[repr(C)]
#[derive(Copy, Clone)]
pub union sqe_buf{
    pub buf_index: u16,
    pub pad: [u64; 3usize],
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct io_uring_sqe {
    pub opcode: u8,
    pub flags: u8,
    pub ioprio: u16,
    pub fd: i32,
    pub off: u64,
    pub addr: u64,
    pub len: u32,
    pub union_flags: sqe_flags,
    pub user_data: u64,
    pub personality: u16,
    pub buf: sqe_buf,
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct io_uring_cqe {
    pub user_data: u64,
    pub res: i32,
    pub flags: u32,
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct io_cqring_offsets {
	pub head: u32,
	pub tail: u32,
	pub ring_mask: u32,
	pub ring_entries: u32,
	pub overflow: u32,
	pub cqes: u32,
	pub resv: [u64; 2usize],
}

#[repr(C)]
#[derive(Copy, Clone)]
struct io_sqring_offsets {
	pub head: u32,
	pub tail: u32,
	pub ring_mask: u32,
	pub ring_entries: u32,
	pub flags: u32,
	pub dropped: u32,
	pub array: u32,
	pub resv1: u32,
	pub resv2: u64,
}

#[repr(C)]
#[derive(Copy, Clone)]
struct io_uring_params {
	pub sq_entries: u32,
	pub cq_entries: u32,
	pub flags: u32,
	pub sq_thread_cpu: u32,
	pub sq_thread_idle: u32,
	pub features: u32,
	pub resv: [u32; 4usize],
	pub sq_off: io_sqring_offsets,
	pub cq_off: io_cqring_offsets,
}

fn main() {
    println!("Hello");
}
